#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int fun(int n);
int main()
{
	int n;
	scanf("%d", &n);
	printf("%d", fun(n));
	return 0;
}
int fun(int a)
{
	int result = 0;
	do
	{
		result = result * 10 + a % 10;
		a /= 10;
	} while (a);
	return result;
}